{template 'common/header'}
<ul class="nav nav-tabs">
		<li><a href="{php echo $this->createWebUrl('homemaking', array('op'=>'list'));}">管理</a></li>
		<li class="active"><a href="{php echo $this->createWebUrl('homemaking', array('op' => 'add','id'=>$item['id']));}">编辑</a></li>
	</ul>
	<form action="" class="form-horizontal form" method="post">
		<div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">家政信息</h3>
          </div>
          <div class="panel-body">
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">状态</label>
                <div class="col-sm-3">
                  <select name="status" class="form-control">
                        <option value="0" {if intval($item[ 'status'])==0} selected{/if}>未完成</option>
                        <option value="1" {if intval($item[ 'status'])==1} selected{/if}>已完成</option>
                        <option value="2" {if intval($item[ 'status'])==2} selected{/if}>已取消</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">家政分类</label>
                <div class="col-sm-3">
                  <select name="category" class="form-control">
                        {loop $categories $category}
                        <option value="{$category['name']}" {if $category[ 'name']==$item[ 'category']} selected{/if}>{$category['name']}</option>
                        {/loop}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">发布人</label>
                <div class="col-sm-3">
                	<input type="text" value="{$item['realname']}" class="form-control" readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">发布时间</label>
                <div class="col-sm-3">
                	<input type="text" value="{php echo date('Y-m-d h:i:s', $item['createtime'])}" class="form-control" readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">服务时间</label>
                <div class="col-sm-3">
                    <input type="text" value="{$item['servicetime']}" class="form-control" readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">说明</label>
                <div class="col-sm-3">
                   <textarea style="height:150px;" class="form-control" name="requirement" cols="70">{$item['content']}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label"></label>
                <div class="col-sm-3">
                   <button type="submit" class="btn btn-primary span3" name="submit" value="提交">提交</button>
					<input type="hidden" name="token" value="{$_W['token']}" />
                </div>
            </div>
          </div>
        </div>
	</form>

{template 'common/footer'}